package com.cjh.mybatis04.session;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.sql.Connection;

/**
 * @Descripton 事务的隔离级别
 * @Author cjh
 * @Date 2023/5/29 10:41
 */
@AllArgsConstructor
@Getter
public enum TransactionIsolationLevel {
//   包括jdbc支持的5个级别
    NONE(Connection.TRANSACTION_NONE),
    READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),
    READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED),
    REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ),
    SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE);

    private final int level;

}
